home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 71 / MOBICLIC 71.ISO / mac / DATA / COMMUN / temp0001 / 00210_Script_GESTION_PISTE_FLASH_RECRES < prev    next >
Text File  |  2004-12-05  |  5KB  |  113 lines

  1. global gze_Label
  2. property p_cettePiste, p_Nodepiste,p_SWF,pEscape,pdeclencheur,p_aiguillage, pNopisteSon,p_start,p_Musik,p_acteur
  3. property p_nomaction,pNbFrames,pSilence,p_attente
  4. ----------------------------------
  5. on getPropertyDescriptionList me
  6.   return [\
  7.  #pdeclencheur:[#comment:"Θchappement α la fin du :",#format:#string,#range:["SON","SWF","Le plus long"],#default: "Le plus long"],\
  8. #pNopisteSon:[#comment:"No piste son:",#format:#integer,#range:[2,3,4,5,6,7,8],#default: 3],\
  9.  #p_aiguillage:[#comment:"branchement α la sortie :",#format:#string,#range:["frame suivante","marker suivant"],#default: "marker suivant"],\
  10. #p_Musik:[#comment: "gestion musique?",#format: #string,#range:["la couper","la laisser","la relancer"], #default:"la laisser"],\
  11. #p_attente:[#comment: "boucle d'attente?",#format:  #boolean, #default:FALSE]\
  12.  ]
  13. end
  14. ----------------------------------------
  15. on beginsprite me
  16.   p_Nodepiste = me.spriteNum
  17.   p_cettePiste = sprite(p_Nodepiste)
  18.   p_acteur =  p_cettePiste.member.name
  19.   p_SWF = p_cettePiste.member
  20.   p_nomaction = p_SWF.name
  21.   fin = length(p_nomaction)
  22.   if p_nomaction.char[fin-1..fin] = "_M" then
  23.     pSilence = 1
  24.   else
  25.     pSilence = 0
  26.   end if
  27.   p_start = the frame
  28.   pEscape = p_cettePiste.endFrame
  29.   pNbFrames = p_SWF.framecount
  30.   gze_Label = the frameLabel
  31. end
  32. ----------------------------------- 
  33. on exitFrame me
  34.   the soundKeepDevice = 0
  35.   if  the frame = p_start then----------------sur la premiΦre frame du swf
  36.     case(p_musik) of----------------------on coupe Θventuellemnet la musique
  37.       "la couper":
  38.         coupeson(1)
  39.         niveauSon()
  40.       "la laisser":
  41.         nothing
  42.       "la relancer":
  43.         niveauSon()
  44.         puppetSound(1,"MUSIK_"&zRacine())
  45.     end case
  46.     if pSilence = 0 then---------------------on joue le son rΘcrΘ
  47.       joueson(p_nomaction,pNopisteSon)
  48.     end if
  49.   else
  50.     if the frame = pEscape then----------------sur la derniΦre frame du swf
  51.       case(p_attente) of
  52.         0:
  53.           case(pdeclencheur) of
  54.             "SON":-------------------------------------si l'Θchappement se fait α la fin du son
  55.               if not(soundBusy(pNopisteSon)) then----------------si le son s'arrΩte
  56.                 niveauSon()
  57.                 aiguillage(p_aiguillage)---------------on sort de la boucle
  58.               else
  59.                 go the frame---------------------------sinon on continue α boucler
  60.               end if
  61.             "SWF":-------------------------------------si l'Θchappement se fait α la fin du swf
  62.               if p_cettePiste.frame =  pNbFrames then----------------si le swf est arrivΘ α son terme
  63.                 coupeson(pNopisteSon)
  64.                 niveauSon()
  65.                 aiguillage(p_aiguillage)---------------on sort de la boucle
  66.               else
  67.                 go the frame---------------------------sinon on continue α boucler
  68.               end if
  69.             "Le plus long":-------------------------------------si l'Θchappement est calΘ sur le mΘdia le plus long
  70.               if not(soundBusy(pNopisteSon)) then----------------si le son s'arrΩte
  71.                 if p_cettePiste.frame =  pNbFrames then----------------et si le swf est arrivΘ α son terme
  72.                   aiguillage(p_aiguillage)----------------------------------on sort de la boucle
  73.                 else
  74.                   go the frame---------------------------sinon on continue α boucler
  75.                 end if
  76.               else-----------------------------------------------si le swf est arrivΘ α son terme
  77.                 if not(soundBusy(pNopisteSon)) then----------------si le son s'arrΩte
  78.                   niveauSon()
  79.                   aiguillage(p_aiguillage)----------------------------------on sort de la boucle
  80.                 else
  81.                   
  82.                   go the frame---------------------------sinon on continue α boucler
  83.                 end if
  84.               end if
  85.           end case
  86.         1:
  87.           cursor 280
  88.           go the frame
  89.       end case
  90.     end if
  91.   end if
  92. end
  93. ---------------------------------------
  94. on aiguillage ZUT
  95.   case(ZUT) of
  96.     "frame suivante":------------------------------branchement α la frame suivante
  97.       go the frame +1
  98.     "marker suivant":------------------------------branchement au marker suivant
  99.       go marker(+1)
  100.   end case
  101. end
  102. ------------------------------------
  103. on mouseUp
  104.   coupeson(pNopisteSon)
  105.   niveauSon()
  106.   aiguillage(p_aiguillage)----------------------------------on sort de la boucle
  107. end
  108. ------------
  109. on endSprite me
  110.   cursor -1
  111. end
  112. ----------------
  113.